<div id="new-problem-dialog" class="modal hide fade">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal">&times;</button>
    <h3><%= t '.add_problem' %></h3>
  </div>
  <div class="modal-body">
    <%= form_for Problem.new, url: problems_create_path, method: :post,
                 html: { class: 'form-horizontal' } do |f| %>
      <div class="control-group">
        <%= f.label :title, t('.title'), class: 'control-label', maxlength: 20 %>
        <div class="controls">
          <%= f.text_field :title %>
          <span class="help-inline" data-errors="title"></span>
        </div>
      </div>
      <div class="control-group">
        <%= f.label :source, t('.source'), class: 'control-label', maxlength: 100 %>
        <div class="controls">
          <%= f.text_field :source %>
          <span class="help-inline" data-errors="source"></span>
        </div>
      </div>
      <%= fields_for ProblemContent.new do |f| %>
        <div class="control-group">
          <%= f.label :time_limit, t('.time_limit'), class: 'control-label', maxlength: 20 %>
          <div class="controls">
            <%= f.text_field :time_limit, class: 'input-small' %>
            <span class="help-inline" data-errors="content.time_limit"></span>
          </div>
        </div>
        <div class="control-group">
          <%= f.label :memory_limit, t('.memory_limit'), class: 'control-label' %>
          <div class="controls">
            <%= f.text_field :memory_limit, class: 'input-small', maxlength: 20 %>
            <span class="help-inline" data-errors="content.memory_limit"></span>
          </div>
        </div>
      <% end %>
    <% end %>
  </div>
  <div class="modal-footer">
    <%= link_to t('.help'), problems_help_path, class: 'btn pull-left' %>
    <button type="button" data-dismiss="modal" class="btn"><%= t '.close' %></button>
    <button type="submit" class="btn btn-primary" data-disabled="<%= t '.submitting' %>"><%= t '.add' %></button>
  </div>
</div>
